package com.example.nftapp.utils;

import android.annotation.SuppressLint;

public class TimeUtil {

    /**
     * 将毫秒时间转换成“mm:ss”
     *
     * @param time 毫秒时间
     * @return “01:32”
     */
    @SuppressLint("DefaultLocale")
    public static String millTimeToStrTime(int time) {
        int durationSeconds = time / 1000;
        int minutes = durationSeconds / 60;
        int seconds = durationSeconds % 60;
        return String.format("%02d:%02d", minutes, seconds);
    }

}
